From: Juri Linkov Date: Tue, 9 Nov 2021 08:24:44 +0000 (+0200) Subject: * lisp/progmodes/prog-mode.el (prog-context-menu): Add "Go Forward". X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~16^2~4110^2~40 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=5e393e2a97398ac4c6335d83d04b94ba8a74982a;p=emacs.git * lisp/progmodes/prog-mode.el (prog-context-menu): Add "Go Forward". The menu item "Go Forward" is bound to xref-go-forward. Also use "Go Back" for xref-go-back (bug#38797). --- diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el index db350a5f704..30b6edf0d9d 100644 --- a/lisp/progmodes/prog-mode.el +++ b/lisp/progmodes/prog-mode.el @@ -49,9 +49,15 @@ (define-key-after menu [prog-separator] menu-bar-separator 'middle-separator) + (unless (xref-forward-history-empty-p) + (define-key-after menu [xref-forward] + '(menu-item "Go Forward" xref-go-forward + :help "Forward to the position gone Back from") + 'prog-separator)) + (unless (xref-marker-stack-empty-p) (define-key-after menu [xref-pop] - '(menu-item "Back Definition" xref-go-back + '(menu-item "Go Back" xref-go-back :help "Back to the position of the last search") 'prog-separator))